Optimal. Leaf size=33 \[ -\frac {a A \cos (c+d x)}{d}-\frac {a A \tanh ^{-1}(\cos (c+d x))}{d}-2 a A x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {21, 3788, 8, 4045, 3770} \[ -\frac {a A \cos (c+d x)}{d}-\frac {a A \tanh ^{-1}(\cos (c+d x))}{d}-2 a A x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 21
Rule 3770
Rule 3788
Rule 4045
Rubi steps
\begin {align*} \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin (c+d x) \, dx &=\frac {A \int (a-a \csc (c+d x))^2 \sin (c+d x) \, dx}{a}\\ &=\frac {A \int \left (a^2+a^2 \csc ^2(c+d x)\right ) \sin (c+d x) \, dx}{a}-(2 a A) \int 1 \, dx\\ &=-2 a A x-\frac {a A \cos (c+d x)}{d}+(a A) \int \csc (c+d x) \, dx\\ &=-2 a A x-\frac {a A \tanh ^{-1}(\cos (c+d x))}{d}-\frac {a A \cos (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.03, size = 72, normalized size = 2.18 \[ \frac {a A \sin (c) \sin (d x)}{d}-\frac {a A \cos (c) \cos (d x)}{d}+\frac {a A \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {a A \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-2 a A x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.57, size = 51, normalized size = 1.55 \[ -\frac {4 \, A a d x + 2 \, A a \cos \left (d x + c\right ) + A a \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - A a \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.67, size = 49, normalized size = 1.48 \[ -\frac {2 \, {\left (d x + c\right )} A a - A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {2 \, A a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.43, size = 50, normalized size = 1.52 \[ -2 a A x -\frac {a A \cos \left (d x +c \right )}{d}+\frac {a A \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}-\frac {2 A a c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 41, normalized size = 1.24 \[ -\frac {2 \, {\left (d x + c\right )} A a + A a \cos \left (d x + c\right ) + A a \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.29, size = 129, normalized size = 3.91 \[ \frac {A\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {2\,A\,a}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {4\,A\,a\,\mathrm {atan}\left (\frac {16\,A^2\,a^2}{8\,A^2\,a^2+16\,A^2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {8\,A^2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,A^2\,a^2+16\,A^2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 12.97, size = 82, normalized size = 2.48 \[ - 2 A a x + A a \left (\begin {cases} - \frac {\cot {\left (c + d x \right )}}{d \csc {\left (c + d x \right )}} & \text {for}\: d \neq 0 \\\frac {x}{\csc {\relax (c )}} & \text {otherwise} \end {cases}\right ) + A a \left (\begin {cases} \frac {x \cot {\relax (c )} \csc {\relax (c )}}{\cot {\relax (c )} + \csc {\relax (c )}} + \frac {x \csc ^{2}{\relax (c )}}{\cot {\relax (c )} + \csc {\relax (c )}} & \text {for}\: d = 0 \\- \frac {\log {\left (\cot {\left (c + d x \right )} + \csc {\left (c + d x \right )} \right )}}{d} & \text {otherwise} \end {cases}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________